package com.yx.enterresourceplanning.service.serviceImpl;

import com.yx.enterresourceplanning.entity.Form;
import com.yx.enterresourceplanning.mapper.FormDao;
import com.yx.enterresourceplanning.service.FormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FormServiceImpl implements FormService {
    @Autowired
    private FormDao formDao;

    // 通过表单编号查询表单
    @Override
    public List<Form> getListFormByFormId(String formId) {
        return formDao.getListFormByFormId(formId);
    }
    // 查询所有表单
    @Override
    public List<Form> getListForm() {
        return formDao.getListForm();
    }
    // 添加表单
    @Override
    public int addForm(String formId, String formName, String formNum, String useDep, String workDep, String overseeDep) {
        return formDao.save(formId, formName, formNum, useDep, workDep, overseeDep);
    }
}
